P=[1 -1 1 -1 1 1 1;1 1 1 -1 -1 1 1;1 1 -1 -1 1 -1 1;1 1 -1 -1 1 1 -1];
t=[-1 -1 1 1 1 -1 1;-1 1 -1 1 -1 1 -1];
net=newp([-1 1;-1 1;-1 1;-1 1],2,'hardlims');
net.trainParam.epochs = 1000;
%net.adaptParam.passes=2000;
net=train(net,P,t);
%Wi;
%[net,a,e]=adapt(net,P,t);
%net.iw{1,1};
%net.b{1};
Wf=net.iw{1,1};
bf=net.b{1};

